// pages/classify/index.js
const { getTabbarShowIndex } = require('../../biztools/main');
const { hideHomeButton } = require('../../common/platform');
const { getLocationFailFlag } = require('../../biztools/info');

Page({
    data: {
        tabsList: [],
        goodsList: [],
        
        locationFail: getLocationFailFlag(),
        tabbar: [],
        activeIndex: 0,
        activeTab: 0,
    },
    onLoad: function (options) {
        hideHomeButton();
    },
    onShow() {
        const { tabbar } = this.data;
        const activeIndex = getTabbarShowIndex(tabbar.list, 'classify');
        this.setData({
            activeIndex,
        });
    },
    tabClickAction(event) {
        this.setData({
            activeTab: event.detail.index,
        });
    },
})